package com.bsj.power.common.config.exception;


import com.bsj.power.common.config.global.JsonResultEnum;

public class ApiException extends RuntimeException {

    private JsonResultEnum status;


    public ApiException(JsonResultEnum status) {
        this.status = status;
    }


    public ApiException(JsonResultEnum status, String message) {
        super(message);
        status.setMsg(message);
        this.status = status;
    }

    public ApiException(JsonResultEnum status, String message, Throwable cause) {
        super(message, cause);
        this.status = status;
    }

    public JsonResultEnum getStatus() {
        return status;
    }
}
